package com.ysxsoft.wdg.adapter.home;


import android.view.View;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ysxsoft.wdg.R;
import com.ysxsoft.wdg.bean.home.MessageBean;

public class MsgAdapter extends BaseQuickAdapter<MessageBean.DataBean,BaseViewHolder> {


    public MsgAdapter(int layoutResId) {
        super(layoutResId);
    }

    public void clear(){
        getData().clear();
        notifyDataSetChanged();
    }

    @Override
    protected void convert(BaseViewHolder helper, MessageBean.DataBean item) {
        helper.setText(R.id.tv_name,item.getType());
        helper.setText(R.id.tv_time,item.getCreate_time());
//        helper.setText(R.id.tv_content,item.getContent());
        TextView t=helper.getView(R.id.tv_content);
        t.setVisibility(View.GONE);
    }
}
